package cn.snowheart.rabbitmq.object;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author liuwanxiang
 * @version 2019/05/27
 */
@Slf4j
@Component
@RabbitListener(queues = "object")
public class UserConsumer {

    @RabbitHandler
    public void process(User user) {
        log.info("Consume: {}", user);
    }

}
